home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
278_03
/
cxlwin.h
< prev
next >
Wrap
C/C++ Source or Header
|
1990-02-13
|
23KB
|
463 lines
/*
┌──────────────────────────────────────────────────────────────────────────┐
│ │
│ CXLWIN.H - CXL is Copyright (c) 1987-1989 by Mike Smedley. │
│ │
│ This header file contains function prototypes and definitions for │
│ windowing functions. │
│ │
└──────────────────────────────────────────────────────────────────────────┘
*/
#if defined(__TURBOC__) /* Turbo C */
#if __STDC__
#define _Cdecl
#else
#define _Cdecl cdecl
#endif
#define _Near
#elif defined(__ZTC__) /* Zortech C++ */
#define _Cdecl
#define _Near
#elif defined(M_I86) && !defined(__ZTC__) /* Microsoft C/QuickC */
#if !defined(NO_EXT_KEYS)
#define _Cdecl cdecl
#define _Near near
#else
#define _Cdecl
#define _Near
#endif
#endif
/*------------------------------[ WINDOW type ]------------------------------*/
typedef int WINDOW;
/*---------------------------[ function prototypes ]-------------------------*/
int _Cdecl wactiv(WINDOW whandle);
int _Cdecl wborder(int btype);
int _Cdecl wbox(int wsrow,int wscol,int werow,int wecol,int btype
,int attr);
int _Cdecl wbprintc(int bord,int offs,int attr,int ch);
int _Cdecl wcclear(int attr);
int _Cdecl wcenters(int wrow,int attr,char *str);
int _Cdecl wchgattr(int battr,int wattr);
int _Cdecl wchkbox(int wsrow,int wscol,int werow,int wecol);
int _Cdecl wchkcol(int wcol);
int _Cdecl wchkcoord(int wrow,int wcol);
int _Cdecl wchkrow(int wrow);
int _Cdecl wclose(void);
int _Cdecl wcloseall(void);
int _Cdecl wclreol(void);
int _Cdecl wclreos(void);
WINDOW _Cdecl wcopy(int nsrow,int nscol);
int _Cdecl wdelline(int wrow,int direc);
int _Cdecl wdrag(int direction);
int _Cdecl wdump(void);
int _Cdecl wdupc(int ch,int count);
int _Cdecl wdups(char *str,int count);
char *_Cdecl werrmsg(void);
int _Cdecl wfill(int wsrow,int wscol,int werow,int wecol,int ch,int attr);
struct _wrec_t *_Cdecl wfindrec(WINDOW whandle);
int _Cdecl wgetc(void);
int _Cdecl wgetchf(char *valid,int defchar);
int _Cdecl wgetns(char *str,int maxchars);
int _Cdecl wgets(char *str);
int _Cdecl wgetyn(int cdefault);
int _Cdecl wgotoxy(int wrow,int wcol);
WINDOW _Cdecl whandle(void);
int _Cdecl whelpcat(int cat);
int _Cdecl whelpclr(void);
int _Cdecl whelpdef(char *file,unsigned key,int winattr,int textattr,
int selattr,int barattr,void (_Cdecl *open)(void));
int _Cdecl whelpop(void);
int _Cdecl whelpopc(void);
int _Cdecl whelppcat(int cat);
int _Cdecl whelpush(void);
int _Cdecl whelpushc(int cat);
int _Cdecl whelpwin(int srow,int scol,int erow,int ecol,int btype,
int title);
int _Cdecl whide(void);
int _Cdecl whline(int wsrow,int wscol,int count,int btype,int attr);
WINDOW _Cdecl windowat(int row,int col);
int _Cdecl winpbeg(int fieldattr,int textattr);
int _Cdecl winpdef(int wrow,int wcol,char *str,char *format,int fconv,
int mode,int (_Cdecl *validate) (char *),int help);
int _Cdecl winpfba(void (_Cdecl *before)(void),
void (_Cdecl *after)(void));
struct _field_t *_Cdecl winpffind(int wrow,int wcol);
int _Cdecl winpkey(unsigned (_Cdecl *getkey)(int *),unsigned *termkey);
int _Cdecl winpread(void);
int _Cdecl winputsf(char *str,char *fmt);
int _Cdecl winsline(int wrow,int direc);
int _Cdecl wmenubeg(int srow,int scol,int erow,int ecol,int btype,
int battr,int wattr,void (_Cdecl *open)(void));
int _Cdecl wmenubegc(void);
int _Cdecl wmenuend(int taginit,int menutype,int barwidth,int textpos,
int textattr,int scharattr,int noselattr,int barattr);
int _Cdecl wmenuget(void);
int _Cdecl wmenuiba(void (_Cdecl *before)(void),
void (_Cdecl *after)(void));
int _Cdecl wmenuidsab(int tagid);
int _Cdecl wmenuienab(int tagid);
struct _item_t *_Cdecl wmenuifind(int tagid);
int _Cdecl wmenuinext(int tagid);
int _Cdecl wmenuitem(int wrow,int wcol,char *str,int schar,int tagid,
int fmask,void (_Cdecl *select)(void),
unsigned hotkey,int help);
int _Cdecl wmenuitxt(int wrow,int wcol,int attr,char *str);
int _Cdecl wmessage(char *str,int border,int leftofs,int attr);
int _Cdecl wmove(int nsrow,int nscol);
WINDOW _Cdecl wopen(int srow,int scol,int erow,int ecol,int btype,int battr,
int wattr);
int _Cdecl wperror(char *message);
int _Cdecl wpgotoxy(int wrow,int wcol);
char *_Cdecl wpickfile(int srow,int scol,int erow,int ecol,int btype,
int bordattr,int winattr,int barattr,int title,
char *filespec,void (_Cdecl *open)(void));
int _Cdecl wpickstr(int srow,int scol,int erow,int ecol,int btype,
int bordattr,int winattr,int barattr,char *strarr[],
int initelem,void (_Cdecl *open)(void));
int _Cdecl wprintc(int wrow,int wcol,int attr,int ch);
int _Cdecl wprintf(const char *format,...);
int _Cdecl wprints(int wrow,int wcol,int attr,char *str);
int _Cdecl wprintsf(int wrow,int wcol,int attr,char *format,char *str);
int _Cdecl wputc(int ch);
int _Cdecl wputns(char *str,int width);
int _Cdecl wputs(char *str);
int _Cdecl wputsw(char *str);
int _Cdecl wreadcur(int *wrow,int *wcol);
void _Cdecl wrestore(int *wbuf);
int _Cdecl wrjusts(int wrow,int wjcol,int attr,char *str);
int *_Cdecl wsave(int srow,int scol,int erow,int ecol);
int _Cdecl wscanf(const char *format,...);
int _Cdecl wscroll(int count,int direc);
int _Cdecl wscrollbox(int wsrow,int wscol,int werow,int wecol,int count,
int direction);
int _Cdecl wselstr(int wrow,int wcol,int attr,char *strarr[],
int initelem);
int _Cdecl wshadoff(void);
int _Cdecl wshadow(int attr);
int _Cdecl wsize(int nerow,int necol);
int _Cdecl wslide(int nsrow,int nscol);
int _Cdecl wtextattr(int attr);
int _Cdecl wtitle(char *str,int tpos,int tattr);
int _Cdecl wunhide(WINDOW whandle);
int _Cdecl wunlink(WINDOW w);
int _Cdecl wvline(int wsrow,int wscol,int count,int btype,int attr);
int _Cdecl wwprints(WINDOW whandle,int wrow,int wcol,int attr,char *str);
/*-------------[ error codes returned from windowing functions ]-------------*/
#define W_NOERROR 0 /* no error */
#define W_ESCPRESS 1 /* Escape key was pressed */
#define W_ALLOCERR 2 /* memory allocation error */
#define W_NOTFOUND 3 /* record not found */
#define W_NOACTIVE 4 /* no active window */
#define W_INVCOORD 5 /* invalid coordinates */
#define W_INVFORMT 6 /* invalid format string */
#define W_NOINPDEF 7 /* no input fields defined */
#define W_STRLONG 8 /* string too long for window */
#define W_INVBTYPE 9 /* invalid box type */
#define W_NOBORDER 10 /* no window border */
#define W_NOHIDDEN 11 /* no hidden windows */
#define W_NOTHIDD 12 /* window is not hidden */
#define W_NOSELECT 13 /* no selectable menu items */
#define W_NOITMDEF 14 /* no menu items defined